package com.mhc.haval.api.service;

import com.mhc.haval.api.dto.DepartmentDTO;
import com.mhc.haval.api.dto.DeptBizAreaDTO;
import com.mhc.haval.api.dto.StaffDTO;
import com.mhc.haval.api.dto.StaffRoleDTO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Created by HMJ on 2017/9/25.
 */
@FeignClient("HAVAL")
@RequestMapping("/feign/IStaffDeptService")
public interface IStaffDeptService {

    /**
     * 查看部门详情信息
     * @param deptId
     * @return
     * @throws Exception
     */
    @RequestMapping(value = {"/queryByInfo"}, method = {RequestMethod.GET})
    public DepartmentDTO queryByInfo(@RequestParam("deptId") Long deptId);

    /**
     * 查询部门列表
     * @param parentDeptId
     * @param companyNo
     * @return
     * @throws Exception
     */
    @RequestMapping(value = {"/queryByDeptList"}, method = {RequestMethod.GET})
    List<DepartmentDTO> queryByDeptList(@RequestParam("parentDeptId") Long parentDeptId,@RequestParam("companyNo") String companyNo);


    /**
     * 根据部门和角色号查询所属员工
     * @param deptId
     * @param roleCode
     * @return
     */
    @RequestMapping(value = {"/selectStaffByDept"}, method = {RequestMethod.GET})
    public List<StaffRoleDTO> selectStaffByDept(@RequestParam("deptId") Long deptId,@RequestParam("roleCode") String roleCode);

    /**
     * 根据省份ID查询所属部门列表
     * @param areaId
     * @return
     */
    @RequestMapping(value = {"/selectBizAreaDeptList"}, method = {RequestMethod.GET})
    public List<DeptBizAreaDTO> selectBizAreaDeptList(@RequestParam("areaId") Long areaId);
}
